#ifndef SINGLENEWDICTELEMENTDIALOG_H
#define SINGLENEWDICTELEMENTDIALOG_H

#include <QtGui/QDialog>

namespace Ui {
    class SingleNewDictElementDialog;
}

class SingleNewDictElementDialog : public QDialog {
    Q_OBJECT
public:
    SingleNewDictElementDialog(const QString &dictName, QWidget *parent = 0, int id = -1, const QString &name = "");
    ~SingleNewDictElementDialog();
    void setDictName(const QString &str);
    void setTableName(const QString tableName);
protected:
    void changeEvent(QEvent *e);

private:
    Ui::SingleNewDictElementDialog *m_ui;
    bool insertRecord();
    bool updateRecord();
    QString table;
    int id;
    QString name;
    bool toChangeElement;
public slots:
    void accept();
};

#endif // SINGLENEWDICTELEMENTDIALOG_H
